package idiet.bean;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the food_material_category database table.
 * 
 */
@Entity
@Table(name="food_material_category")
public class FoodMaterialCategory implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String alias;

	private String comment;

	@Column(name="lm_timestamp")
	private Timestamp lmTimestamp;

	private String name;
	@ManyToOne
	@JoinColumn(name="parent_id")
	private FoodMaterialCategory parentCategory;

	//bi-directional many-to-one association to FoodMaterial
	@OneToMany(mappedBy="foodMaterialCategory")
	private List<FoodMaterial> foodMaterials;
	@OneToMany(mappedBy="parentCategory")
	private List<FoodMaterialCategory> childCategories;
	public FoodMaterialCategory() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getAlias() {
		return this.alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Timestamp getLmTimestamp() {
		return this.lmTimestamp;
	}

	public void setLmTimestamp(Timestamp lmTimestamp) {
		this.lmTimestamp = lmTimestamp;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public FoodMaterialCategory getParentCategory() {
		return parentCategory;
	}

	public void setParentCategory(FoodMaterialCategory parentCategory) {
		this.parentCategory = parentCategory;
	}

	public List<FoodMaterialCategory> getChildCategories() {
		return childCategories;
	}

	public void setChildCategories(List<FoodMaterialCategory> childCategories) {
		this.childCategories = childCategories;
	}

	public List<FoodMaterial> getFoodMaterials() {
		return this.foodMaterials;
	}

	public void setFoodMaterials(List<FoodMaterial> foodMaterials) {
		this.foodMaterials = foodMaterials;
	}

}